<!-- html  4 
  -->

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>

      let now = new Date()

      let year = now.getFullYear();
      let mounth = now.getMonth()+1;
      let date = now.getDate();
      let hour = now.getHours();
      let min = now.getMinutes();
      let sec = now.getSeconds();

      let time = year+"-"+mounth+"-"+date+" "+hour+":"+min+":"+sec
      console.log("yyyy-MM-dd HH:mm:ss" ,time );
      


      //时间戳  返回自1970年1月1日至某一时刻的毫秒值（时间戳）
      console.log("tims" ,new Date().getTime() );






         

    </script>
</head>

<body>




</body>

</html>